package demo.api.enterprise;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import util.HttpClientUtil;

public class ImagePersonSignature {
	
	private static String appKey = "cAwut4VATycNMq17NZeFUD63pe83l2OJ";
    private static String appSecrty = "3BAlrfr7lW8kwlCMfo1dXS8Syn5q5qjS";
    private static String baseUrl = "http://smp-test.szitrus.com.cn/smp-api";
    private static String api = "/api/enterprise/image/official-seal";

	public static void main(String[] args) throws IOException {
		String url = baseUrl.concat(api);
	    // 请求参数
	    Map<String, String> params = new HashMap<>();
	    params.put("user_id", "gaoym");
	    params.put("need_image", "no");//是否需要图片编码,默认为 "yes"（需要），取值范围： "yes" / "no"
	    String resStr =  HttpClientUtil.getResponse(url, params, appKey, appSecrty);
	    JSONObject resJson = JSON.parseObject(resStr);
	    System.out.println(resJson);
	}
}
